#!/bin/bash

echo "classify by user:"
cat secure|egrep "Failed"|cut -d " " -f11|egrep "^[a-Z]"|sort|uniq -c|sort -n
cat secure|egrep "Failed"|cut -d " " -f9|egrep "root"|sort|uniq -c|sort -n


echo "classify by ip:"
cat secure|egrep "Failed"|cut -d " " -f11|egrep "^[0-9]"|sort|uniq -c|sort -n
cat secure|egrep "Failed"|cut -d " " -f13|egrep "^[0-9][0-9][0-9]\."|sort|uniq -c|sort -n
